Skip to content

Add LeavePlural config option #474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2020
Merged

Add LeavePlural config option #474

merged 2 commits into from
May 4, 2020

Conversation

tgulacsi
Copy link
Contributor

@tgulacsi tgulacsi commented May 2, 2020

If set to true, the struct names are not singularized.

My table names are not English, stripping the "s" from the end
is quite annoying.

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I'm happy with these changes.

You'll need to put the call to inflection.Singular in the MySQL package behind the flag.

The only change I'd like to make is to the parameter name. I think "leave_plural" is too vague. How about "emit_exact_table_names"?

tgulacsi added 2 commits May 4, 2020 08:08
If set to true, the struct names (derived from table names)
are not singularized.

My table names are not English, stripping the "s" from the end
is quite annoying.
@tgulacsi tgulacsi requested a review from kyleconroy May 4, 2020 06:21
@kyleconroy kyleconroy merged commit 3d3630a into sqlc-dev:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants